package com.bw.base.net

import com.bw.base.entity.AnnounceEntity
import com.bw.base.entity.CodeEntity
import com.bw.base.entity.LoginEntity
import com.bw.base.entity.RegisterEntity
import com.bw.base.entity.Res
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Query

interface ApiURL {
    @POST(Const.LOGIN_URL)
    suspend fun login(@Query("password")password:String,@Query("username")username:String): Res<LoginEntity>
    @POST(Const.REGISTER_URL)
    suspend fun register(@Query("password")password:String,@Query("username")username:String): Res<RegisterEntity>
    @POST(Const.CODE_URL)
    suspend fun code(@Query("phone")phone:String): Res<CodeEntity>
    @GET(Const.ANNOUNCE_URL)
    suspend fun announce(@Query("page")page:Int,@Query("size")size:Int): Res<AnnounceEntity>
}